As understood by one of skill in the art, software is often used as an intermediary between the hardware components of a computing system and the operating system and other high level software executing on the computing system. In some computer systems this intermediate software is known as the computer Basic Input and Output System (“BIOS”). The BIOS provides a set of software routines that allow high level software to interact with the hardware components of the computing system using standard calls.
Because of limitations of the BIOS in many PC-compatible computers, such as the requirement for 16-bit compatibility, a new specification for booting a computer and for communicating between the operating system and the hardware has been proposed. The new specification is called the Extensible Firmware Interface (“EFI”), which was originally developed by INTEL CORPORATION and which is now being developed by the Unified EFI Forum.
The EFI specification describes an interface between the operating system and the system firmware. In particular, the EFI specification defines the interface that platform firmware must implement, and the interface that the operating system may use in booting. EFI also publicizes services used by BIOS firmware, Option ROMs, EFI applications, and the like. How the firmware implements the interface is left up to the manufacturer of the firmware. The EFI specification provides protocols for EFI drivers to communicate with each other, and the core provider functions such as allocation of memory, creating events, setting the clock, and many others. This is accomplished through a formal and complete abstract specification of the software-visible interface presented to the operating system by the platform and the firmware.
Both BIOS and EFI utilize the system management mode (“SMM”) provided in microprocessors available from INTEL CORPORATION and AMD CORPORATION. SMM is a special-purpose operating mode for handling system-wide functions like power management, system hardware control, running proprietary code, workarounds for errata, error logging, and platform security. It is intended only for use by system firmware, not by application software or general-purpose system software. The main benefit of SMM is that it offers a distinct and easily isolated processor environment that operates transparently to the operating system and software applications.
When SMM is invoked through a system management interrupt (“SMI”), the central processing unit saves the current state of the processor (the processor's context), then switches to a separate operating environment contained in a special portion of random access memory (“RAM”) called the system management RAM (“SMRAM”). While in SMM, the microprocessor executes SMI handler code to perform operations such as powering down unused disk drives or monitors, executing proprietary code, or placing the entire computer in a suspended state. When the SMI handler has completed its operations, it executes a resume (“RSM”) instruction. This instruction causes the microprocessor to reload the saved context of the processor, switch back to protected or real mode, and resume executing the interrupted application.
Most system initialization is performed during the Driver Execution Environment (“DXE”) phase of EFI. Pre-EFI Initialization (“PEI”) executes prior to DXE and initializes platform memory so that the DXE phase can be executed. PEI provides a subset of services similar to EFI. In a computer system that implements EFI, PEI phase can be entered from many phases, such as cold-boot, warm boot, CPU-only reset, power-on, and resume. When a computer system is resuming from an S3 standby state, however, DXE is not entered after PEI. So that the SMM Base (“SMBASE”) stays consistent across phases, conventional EFI implementations use the same SMBASE initialization routine for both PEI and DXE. Thus, the PEI and DXE implementations are dependent on each other. Accordingly, there is a need in the art for methods, systems, and computer program products that would enable a PEI implementation to be independent from a DXE implementation.